package com.itheima.dto;


import com.itheima.bean.Dish;
import com.itheima.bean.DishFlavor;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class DishDto extends Dish {

    private List<DishFlavor> flavors = new ArrayList<>();

    private String categoryName;

    private Integer copies;

    public void setFlavors(List<DishFlavor> flavors) {
        this.flavors = flavors;
    }

    public DishDto(List<DishFlavor> flavors, String categoryName) {
        this.flavors = flavors;
        this.categoryName = categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }
}
